﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZSZ.DTO;

namespace ZSZ.Iservice
{
   public interface IHouseService:IServiceSupport
    {
        HouseDTO GetById(long id);
        /// <summary>
        /// 获取 typeId 这种房源类别下 cityId 这个城市中房源的总数量
        /// </summary>
        /// <param name="typeId"></param>
        /// <param name="cityId"></param>
        /// <returns></returns>
        long GetTotalCount(long typeId,long cityId);
        /// <summary>
        /// 分页获取typeId这种房源类型下cityId这个城市中房源
        /// </summary>
        /// <param name="cityId"></param>
        /// <param name="typeId"></param>
        /// <param name="pageSzie"></param>
        /// <param name="currentIndex"></param>
        /// <returns></returns>
        HouseDTO[] GetPagedData(long cityId,long typeId,int pageSzie,int currentIndex);
        long AddNew(HouseDTO house);
        void Update(HouseDTO house);
        void MarkDeleted(long id);
        HousePicDTO[] GetPics(long houseId);
        long AddNewHousePic(HousePicDTO housePic);
        void DeleteHousePic(long housePicId);
        HouseSearchResult Search(HouseSearchOptions options);
        int GetCount(long cityId,DateTime startDateTime,DateTime endDatetiom);
    }
}
